package com.sqfw.project.wp.constant;

public enum WpStateEnum {
    HUIFANG("工单回访" , "工单回访", null),
    ZHIJIAN("自行办结（12345工单）" , "质检待审核", null),
    CHENGBAN("承办单位处理" , "承办单位处理", null),
    GUIDANG("工单归档" , "工单归档", null);

    private String active;
    private String state;
    private String smNo;

    WpStateEnum(){

    }
    WpStateEnum(String active, String state, String smNo){
        this.active = active;
        this.state = state;
        this.smNo = smNo;
    }

    /**
     * 获取结果
     * @param active
     * @return
     */
    public static String getState(String active) {
        for (WpStateEnum status : WpStateEnum.values()) {
            if (status.active.equals(active)) {
                return status.state;
            }
        }
        return null;
    }

    /**
     * 获取短信编码
     * @param active
     * @return
     */
    public static String getSmId(String active) {
        for (WpStateEnum status : WpStateEnum.values()) {
            if (status.active.equals(active)) {
                return status.smNo;
            }
        }
        return null;
    }
}
